This invention relates to a method and apparatus for receiving and transmitting data in a network communication system, and more particularly, to a method and apparatus of receiving and transmitting frames between a public device and a private device in a Fibre Channel network communication system.
The Fibre Channel family of standards (developed by the American National Standards Institute (ANSI)) defines a high speed communications interface for the transfer of large amounts of data between a variety of hardware systems such as personal computers, workstations, mainframes, supercomputers, and storage devices that have Fibre Channel interfaces. Use of Fibre Channel is proliferating in client/server applications which demand high bandwidth and low latency I/O such as mass storage, medical and scientific imaging, multimedia communication, transaction processing, distributed computing and distributed database processing applications.
Fibre Channel uses one, or a combination, of several topologies (e.g., point-to-point topology, a fabric topology, or a loop topology) to establish a logical point-to-point serial channel. The Fibre Channel point to point topology directly connects two Fibre Channel systems. The Fibre Channel fabric topology uses a switching fabric, which is constructed from one or more Fibre Channel switches, to provide a bi-directional connection from one N_Port to another. The Fibre Channel loop topology is an arbitrated loop with ring connections that provide loop-capable device nodes (NL_Ports) the ability to arbitrate access to a shared bandwidth.
Devices coupled to a fabric may be either a public device (for example, a device coupled to a fabric via an F_Port or FL_Port) or a private loop device (for example, a device coupled to a fabric via an FL_Port and not capable of FLOGI). In conventional Fibre Channel systems, if a public device and a private loop device are not coupled to the same loop, the public device cannot communicate with the private loop device but can only communicate with other public devices; similarly, the private loop device cannot communicate with the public device but can only communicate with other devices coupled to the same loop.
Since conventional Fibre Channel switching systems and methods do not allow public devices to send frames to and receive frames from private loop devices, there is a need for an improved switching system and method which allows communication between private loop devices and public devices.
The present invention overcomes the deficiencies and limitations of the prior art with a novel method and apparatus for sending and receiving frames between a public device and a private device. The present invention advantageously assigns a public device a phantom address mapping the public device to a phantom device. When a private device sends frames to or receives frames from a public device, it does so by sending frames to and receiving frames from the phantom device. The phantom device is virtually coupled to the private loop, and the FL_Port to which the loop device is coupled acts as an agent for the public device. Thus, all communication between the public device and the private device occurs as if the communication were between the phantom device and the private device.
In one aspect of the invention, a system and method for sending frames between a public device and a private device comprises a phantom device mapping, an address translation, a frame payload translation, and a CRC regeneration. The present invention assigns a phantom AL_PA for the public device and establishes a phantom device mapping between the phantom AL_PA and the public device""s Port_ID. With the phantom device mapping, the present invention directs all communication between the public device and the private loop device as if the communication were between a phantom device and the private device. Specifically, the present invention accomplishes this by performing a public-to-private address translation in one direction and a private-to-public address translation in the other direction.
During a public-to-private address translation process, the destination address of a frame transmitted from a public device is evaluated to determine if the destination address is an address for a private loop device using a device type table lookup. If the lookup result indicates that the destination device is a private loop device, then the source address of the frame is converted to a phantom AL_PA. Preferably, the public-to-private address translation uses a Port_ID to phantom AL_PA mapping table and finds an entry where the Port_ID matches the source address. The public-to-private address translation replaces the source address of the frame with the phantom AL_PA of the matched entry, and the destination address with the AL_PA only of the destination device. Generally, the new destination address 214 is created by replacing the upper two byte (LL LL) of the original destination 204 with (00 00). Thus, after translation, the frame contains a new destination address and a new source address, where both addresses are preferably of the form {0x0000, AL_PA}. Thus, the present invention enables a public device to appear as a phantom private device on a loop and therefore allows a frame sent from the public device to the private loop device to be transmitted to the loop.
During a private-to-public address translation process, the destination address of a frame transmitted from a private loop device is evaluated to determine if the destination address is a phantom device, preferably, using a device type table lookup. If the lookup result indicates that the destination address is a phantom address, then the destination address is converted to a Port_ID of the public device. Preferably, the private-to-public address translation uses a phantom AL_PA (PP)n in the destination address (00 00 PP)n. The private-to-public address translation replaces the destination address of the frame with the Port_ID of the matched entry, and the source address with the fabric assigned address of the private device. Generally, the new source address is created by replacing the upper two bytes (00 00) of the original source address with (LL LL). Thus, after translation, frame contains the actual destination address of the public device and a full fabric source address for the private loop device. Therefore, the present invention advantageously enables a private loop device to appear as a public loop device and therefore, to allow frames sent from the private loop device to the public device to be transmitted across the fabric.